package net.aiion.weave.spi.bytecode;

import java.util.Collection;

import net.aiion.weave.spi.bytecode.events.BytecodeEvent;

public interface BytecodeContext
{
    void postponeSourcing();

    void postponeSourcing(ResumptionCondition aResumptionCondition);

    void cancelSourcing();

    boolean isPostponed();

    boolean isCancelled();

    void setProperty(String aName, Object aValue);

    void removeProperty(String aName);

    Object getProperty(String aName);

    <T> T getProperty(String aName, Class<T> aType);

    BytecodeEvent getBytecodeEvent();

    BytecodeGenerator getBytecodeGenerator();

    void forwardBytecodeEvent(BytecodeEvent aBytecodeEvent);

    void forwardBytecodeEvents(Collection<BytecodeEvent> aBytecodeEvents);
}
